<%@page import="ll.sms.factory.BeanFactory"%>
<%@ page language="java"
	import="ll.sms.interfaces.*,ll.sms.web.*,ll.sms.pojo.*"
	pageEncoding="utf-8"%>
<%
	String username = ParamUtils.getParameter(request, "username");
	String password = ParamUtils.getParameter(request, "password");
	String rand = ParamUtils.getParameter(request, "randCode");
	String rands = (String) session.getAttribute("rand");
	if (!rands.equals(rand)) {
		out
				.print("{success:false,errors:{\"msg\":'    验证码校验失败         '}}");
		return;
	}
	WebBusinessInterface wb = (WebBusinessInterface) BeanFactory
			.getBean(WebBusinessImpl.class);
	System.out.print(wb);
	SmsAdmin smsAdmi = wb.checkUserByUsername(username, password);
	if (smsAdmi == null) {

		out.print("{success:false,errors:{\"msg\":'用户不存在或者密码错误'}}");
	} else {
		session.setAttribute("user", smsAdmi);
		out.print("{success:true}");
	}
%>
